<template>
  <div>
    <div class="new_games">
      <div class="new_games_title">
        <img src="../../../assets/img/home/ic_amount.png" alt="" />
        <span class="title">新游助力起步</span>
      </div>
      <div class="new_games_box">
        <swiper :options="swiperOption">
          <swiper-slide
            v-for="(item, index) in list"
            :key="index"
            class="swiper_item">
            <div class="game_info">
              <img :src="item.gameicon" alt="" />
              <div class="game_info_right">
                <div class="game_name">
                  {{item.gamename}}
                </div>
                <div class="gerenstr_box">
                  <span style="color: #999999;">{{item.gerenstr}}</span>
                  <span class="first_time">{{item.firsttime}}</span>
                </div>
              </div>
            </div>
            <ul class="game_coupon">
              <li class="coupon_item">
                <div class="coupon_item_left">
                  <div>
                    <span style="font-size: .346667rem;">¥</span>
                    <span class="amount_text">10</span>
                  </div>
                  <div style="font-size: .266667rem;">无门槛</div>
                </div>
                <div class="coupon_item_right">
                  <div>领</div>
                  <div>取</div>
                </div>
              </li>
              <li class="coupon_item">
                <div class="coupon_item_left">
                  <div>
                    <span style="font-size: .346667rem;">¥</span>
                    <span class="amount_text">10</span>
                  </div>
                  <div style="font-size: .266667rem;">满减券</div>
                </div>
                <div class="coupon_item_right">
                  <div>领</div>
                  <div>取</div>
                </div>
              </li>
            </ul>
          </swiper-slide>
        </swiper>
      </div>
    </div>
  </div>
</template>

<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/swiper-bundle.css";
export default {
  components: {
    Swiper,
    SwiperSlide,
  },
  data() {
    return {
      swiperOption: {
        slidesPerView: "auto",
      },
      list: [
        {
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },
        {
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },{
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },
        {
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },{
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },
        {
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },{
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },
        {
          gameicon: "https://p1.277sy.com/2021/07/16/60f0f7b4c2dc3.gif",
          gamename: "战无不胜（决战昆仑墟）",
          gerenstr: "角色 • 武侠",
          firsttime: "07月22日",
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.new_games {
  width: 9.466667rem;
  height: 4.72rem;
  background: #fff;
  margin: .266667rem auto 0;
  border-radius: 0.266667rem;
}

.new_games_title {
  font-size: 0.48rem;
  font-weight: 800;
  color: #000;
  display: flex;
  align-items: center;
  padding-top: 0.4rem;
  padding-left: 0.266667rem;
  img {
    margin-right: 0.133333rem;
    display: inline-block;
    width: 0.586667rem;
    height: 0.586667rem;
  }
}

.new_games_box {
  height: 2.933333rem;
  width: 9.466667rem;
  margin-top: 0.4rem;
}

.swiper_item {
  box-sizing: border-box;
  width: 6.213333rem;
  height: 2.933333rem;
  padding: 0 .266667rem;
  .game_info {
    width: 5.68rem;
    height: 1.333333rem;
    font-size: .426667rem;
    display: flex;
    img {
      width: 1.333333rem;
      height: 1.333333rem;
      margin-right: .266667rem;
    }
    .game_info_right {
      flex: 1;
      .game_name {
        padding-top: .08rem;
        font-size: .4rem;
        font-weight: bold;
        color: #222222;
        width: 4.08rem;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
      }
      .gerenstr_box {
        padding-top: .266667rem;
        font-size: .32rem;
        .first_time {
          margin-left: .266667rem;
          display: inline-block;
          height: .32rem;
          line-height: .32rem;
          padding: 0 .08rem;
          border: 1px solid #ec614d;
          border-radius: .186667rem;
          font-size: .266667rem;
          color: #ec614d;
        }
      }
    }
  }
  .game_coupon {
    width: 5.68rem;
    height: 1.333333rem;
    margin-top: .266667rem;
    display: flex;
    justify-content: space-between;
    .coupon_item {
      position: relative;
      width: 2.746667rem;
      height: 1.333333rem;
      background: linear-gradient(134deg, #FFAC58 0%, #FF4600 100%);
      border-radius: .133333rem;
      font-size: .32rem;
      color: #fff;
      display: flex;
      justify-content: space-around;
      .coupon_item_left {
        width: 2.04rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border-right: .013333rem dashed #fff;
        .amount_text {
          font-size: .8rem;
          line-height: .8rem;
          font-weight: bold;
        }
      }
      .coupon_item_right {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: .346667rem;
        line-height: .48rem;
      }
    }
  }
}
</style>